package com.ddwl.shop.job;


import com.ddwl.shop.service.WxTokenService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class WxJobHandler {

    private final WxTokenService wxTokenService;

    @XxlJob("WxTokenJob")
    public ReturnT<String> wxTokenJob(String param) {
        log.info("############## 执行微信TokenJob Begin #########");
        wxTokenService.handleToken();
        log.info("############## 执行微信TokenJob End #########");
        return ReturnT.SUCCESS;
    }

}
